home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / bbs_util / wmch11.zip / WMCHAT2.MOD < prev    next >
Text File  |  1996-04-05  |  10KB  |  342 lines

  1. ┌───────────────────────────────────────────────────────────────────────────┐
  2. │ Mod Name: WMCHAT2.MOD                                                     │
  3. │ WWIV version: 4.24a                                                       │
  4. │ Difficulty: Medium.                                                       │
  5. │ Date: 3/7/96                                                              │
  6. │ Modifies: BBS.C, BBSUTL.C, BBSUTL1.C, COM.C, INSTMSG.C, LILO.C, MMENU.C,  │
  7. │           MULTINST.C, MAKEFILE.MAK, UTILITY.C, and VARS.H.                │
  8. │ Author: Pug, 1@11750 (WWIVnet), 1@1 (IsleLink)                            │
  9. └───────────────────────────────────────────────────────────────────────────┘
  10.  
  11.   I STRONGLY, STRONGLY, STRONGLY, STRONGLY SUGGEST YOU READ THE WMCHAT.DOC
  12.                       FILE BEFORE INSTALLING THIS!!!!
  13.  
  14.         This is the "cut-down" version of the WMChat mod.  Installing
  15.            WMCHAT1.MOD is suggested.  Use this only if necessary.
  16.  
  17. Legend:
  18. .______________________.
  19. | == | Existing code   |
  20. | ++ | Add this line   |
  21. | -- | Remove this line|
  22. | =+ | Change this line|
  23. .----------------------.
  24.  
  25. Step 1:  BACK UP YOUR SOURCE CODE!
  26.  
  27. Step 2:  Get yourself a beer.
  28.  
  29. Step 3:  Open INSTMSG.C
  30.  
  31.          Make changes to handle_inst_msg():
  32.  
  33. ==        nln(2);
  34. ==        read_user(ih->from_user,&u);
  35. ++        if (in_chatroom) {
  36. ++          i=0;
  37. ++          nl();
  38. ++          while (i<ih->msg_size)
  39. ++            outchr(msg[i++]);
  40. ++          return(ih->main);
  41. ++        }
  42. ==        if (ih->main==INST_MSG_STRING)
  43. ==          npr("1%.12s (%d)0> 2",nam(&u,ih->from_user), ih->from_inst);
  44.  
  45.          Save INSTMSG.C
  46.  
  47. Step 4:  Open MULTINST.C
  48.  
  49.          Make changes to make_inst_str():
  50.  
  51. ==
  52. ++  d = wmchat_str;
  53. ==  get_inst_info(wi, &ir);
  54. ==  sprintf(s,"1%-3d",wi);
  55.  
  56.          Skipping down some...
  57.  
  58. ==      strncat(s,s1,sizeof(s));
  59. ==    }
  60. ==  }
  61. ==
  62. ++  if((ir.loc >= INST_LOC_CH1) && (ir.loc <= INST_LOC_CH10)) 
  63. ++    sprintf(s1,"%-25.25s",get_stringx(d,55));
  64. ++  else
  65. ==  switch (ir.loc) {
  66. ==    case INST_LOC_DOWN:
  67. ==      break;
  68.  
  69.          Save MULTINST.C
  70.  
  71. Step 5:  Open COM.C
  72.  
  73.          Locate and add the following code in nl();
  74.  
  75. ==  else
  76. ==    outstr("\r\n");
  77. --  if (inst_msg_waiting())
  78. ++  if (inst_msg_waiting() && !chatline)
  79. ==    process_inst_msgs();
  80. ==}
  81.  
  82.          Locate and add the following code in skey1():
  83.  
  84. ==      case 18:
  85. ==        if (echo)
  86. ==          reprint();
  87. ==        break;
  88. ++      case 12: /* CTRL - L */
  89. ++        if(so())
  90. ++        toggle_invis();
  91. ++        break;
  92. ++      case 14: /* CTRL - N */
  93. ++        toggle_avail();
  94. ++        break;
  95. ==      case 25:
  96.  
  97.          Locate and add the following code in input1():
  98.  
  99. ==  while (!done && !hangup) {
  100. ==    ch = getkey();
  101. ++    if(curpos) chatline=1;      
  102. ++    else chatline=0;
  103. ==    if (in_ansi) {
  104. ==      if ((in_ansi==1) && (ch!='['))
  105.  
  106.          Save COM.C
  107.  
  108. Step 6:  Open LILO.C
  109.  
  110.          In function logon(), make appropriate changes:
  111.  
  112. ==        prt(3,get_string(378));
  113. ==        nl();
  114. ==  }
  115. ++  if (((incom) || (sysop1())) && (thisuser.sl < 255)) {
  116. ++        sprintf(s, "%s %s", thisuser.name, get_string(1172));
  117. ++        broadcast(s);
  118. ++  }
  119. --  if ((incom) || (sysop1()))
  120. --        broadcast(get_string(1172));
  121. ==  setiia(90);
  122.  
  123.          Skipping down some...
  124.  
  125. ==  if (usernum>0) {
  126. ++    if (((incom) || (sysop1())) && (thisuser.sl < 255)) {
  127. ++        sprintf(s, "%s %s", thisuser.name, get_string(1173));
  128. ++        broadcast(s);
  129. ++    }
  130. --        if ((incom) || (sysop1()))
  131. --          broadcast(get_string(1173));
  132. ==  }
  133. ==  setiia(90);
  134.  
  135.          Save LILO.C
  136.  
  137. Step 7:  Open VARS.H
  138.  
  139.          Make appropriate changes:
  140.  
  141. == #include "os2lib.h"
  142. == #endif
  143. ==
  144. == #include "fcns.h"
  145. ++ #include "wmchat.h"
  146.  
  147.          Skipping down some..
  148.  
  149. == __EXTRN__ unsigned short com_speed, *csn_index, crc, *gat, modem_flag,
  150. ==                          modem_mode, modem_speed, net_sysnum, curloc, eflags;
  151. ==
  152. ++ #include "wmvars.h";
  153. ++
  154. == __EXTRN__ unsigned int subconfnum, dirconfnum;
  155.  
  156.          Save VARS.H
  157.  
  158. Step 8: Open BBSUTL1.C
  159.  
  160.          In function write_instance(), make the following changes:
  161.  
  162. ==  if (useron) {
  163. ==    cf |= INST_FLAGS_ONLINE;
  164. ++    if (invis) cf |= INST_FLAGS_INVIS;
  165. ==    if (!(thisuser.sysstatus & sysstatus_no_msgs)) {
  166.  
  167.          Skipping down some...
  168.  
  169. ==        case INST_LOC_EMAIL:
  170. ==        case INST_LOC_CHATROOM:
  171. ==        case INST_LOC_RMAIL:
  172. ++          if(avail) 
  173. ==          cf |= INST_FLAGS_MSG_AVAIL;
  174. ==          break;
  175. ++        default:
  176. ++          if ((loc >= INST_LOC_CH1) && (loc <= INST_LOC_CH10) && avail)
  177. ++          cf |= INST_FLAGS_MSG_AVAIL;
  178. ++          break;
  179. ==      }
  180. --    } else if (loc == INST_LOC_CHATROOM) {
  181. --      cf |= INST_FLAGS_MSG_AVAIL;
  182. ==    }
  183. ==    if (using_modem)
  184.  
  185.           Skipping down some...
  186.  
  187. ==      ti.flags |= flags;
  188. ==    }
  189. ==  }
  190. ==  
  191. ++    if((ti.flags & INST_FLAGS_INVIS) && (!invis)) {
  192. ++      cf = 0;
  193. ++      if (ti.flags & INST_FLAGS_ONLINE) cf |= INST_FLAGS_ONLINE;
  194. ++      if (ti.flags & INST_FLAGS_MSG_AVAIL) cf |= INST_FLAGS_MSG_AVAIL;
  195. ++      re_write = 1;
  196. ++    }
  197. ++
  198. ==  if (cf!=ti.flags) 
  199.  
  200.          Skipping down some more...
  201.  
  202. ==    re_write=1;
  203. ==    ti.loc=loc;
  204. ==  }
  205. ==
  206. ++  if((((ti.flags & INST_FLAGS_INVIS) && (!invis)) ||
  207. ++     ((!(ti.flags & INST_FLAGS_INVIS)) && (invis))) ||
  208. ++     (((ti.flags & INST_FLAGS_MSG_AVAIL) && (!avail)) ||
  209. ++     ((!(ti.flags & INST_FLAGS_MSG_AVAIL)) && (avail))) &&
  210. ++     (ti.loc!=INST_LOC_WFC)) re_write=1;
  211. ++
  212. ==  if (re_write) {
  213.  
  214.          Save BBSUTL1.C
  215.  
  216. Step 9 Open UTILITY.C
  217.  
  218.          Locate this code in giveup_timeslice(), add marked line:
  219.  
  220. ==    /* delay(17); */
  221. ==  }
  222. ==#endif
  223. ++  if ((!in_chatroom) || (!chatline)) 
  224. ==  if (inst_msg_waiting())
  225. ==    process_inst_msgs();
  226.  
  227.          Save UTILITY.C
  228.  
  229. Step 10: Open MAKEFILE.MAK
  230.  
  231.    READ THIS! READ THIS! READ THIS! BE CAREFUL! VERY IMPORTANT! READ THIS! 
  232.  
  233. ---->     If you are using BORLAND C++, make the following changes.      <----
  234. ---->     Otherwise proceed down to the instructions for Turbo C++.      <----
  235.           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  236.  
  237. == BBS_OVL = \
  238. ==         batch.obj    bbsovl1.obj  bbsovl2.obj  bbsovl3.obj  \
  239. ==         chnedit.obj  conf.obj     defaults.obj diredit.obj  \
  240. ==         extrn1.obj   gfiles.obj   gfledit.obj  ini.obj      \
  241. ==         instmsg.obj  lilo.obj     misccmd.obj  multinst.obj \
  242. ==         multmail.obj netsup.obj   newuser.obj  qwk.obj      \
  243. ==         qwk1.obj     readmail.obj ripovl.obj   sr.obj       \
  244. ==         srrcv.obj    srsend.obj   subedit.obj  subreq.obj   \
  245. ==         subxtr.obj   sysopf.obj   tedit.obj    uedit.obj    \
  246. ==         voteedit.obj xferovl.obj  xferovl2.obj xfertmp.obj  \
  247. --         xinit.obj
  248. ++         xinit.obj    wmchat.obj
  249. ==
  250. == BBS_O_OVL = \
  251. ==         $(OBJ)\batch.obj    $(OBJ)\bbsovl1.obj  $(OBJ)\bbsovl2.obj  \
  252. ==         $(OBJ)\bbsovl3.obj  $(OBJ)\chnedit.obj  $(OBJ)\conf.obj     \
  253. ==         $(OBJ)\defaults.obj $(OBJ)\diredit.obj  $(OBJ)\extrn1.obj   \
  254. ==         $(OBJ)\gfiles.obj   $(OBJ)\gfledit.obj  $(OBJ)\ini.obj      \
  255. ==         $(OBJ)\instmsg.obj  $(OBJ)\lilo.obj     $(OBJ)\misccmd.obj  \
  256. ==         $(OBJ)\multinst.obj $(OBJ)\multmail.obj $(OBJ)\netsup.obj   \
  257. ==         $(OBJ)\newuser.obj  $(OBJ)\qwk.obj      $(OBJ)\qwk1.obj     \
  258. ==         $(OBJ)\readmail.obj $(OBJ)\ripovl.obj   $(OBJ)\sr.obj       \
  259. ==         $(OBJ)\srrcv.obj    $(OBJ)\srsend.obj   $(OBJ)\subedit.obj  \
  260. ==         $(OBJ)\subreq.obj   $(OBJ)\subxtr.obj   $(OBJ)\sysopf.obj   \
  261. ==         $(OBJ)\tedit.obj    $(OBJ)\uedit.obj    $(OBJ)\voteedit.obj \
  262. ==         $(OBJ)\xferovl.obj  $(OBJ)\xferovl2.obj $(OBJ)\xfertmp.obj  \
  263. --         $(OBJ)\xinit.obj
  264. ++         $(OBJ)\xinit.obj    $(OBJ)\wmchat.obj
  265.  
  266.    READ THIS! READ THIS! READ THIS! BE CAREFUL! VERY IMPORTANT! READ THIS!
  267.  
  268. ---->   If you are using TURBO C++, make following changes.  Otherwise   <----
  269. ---->   proceed to step 11.                                              <----
  270.         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  271.  
  272. == BBS_OVL = \
  273. ==        $(OBJ)newuser.obj $(OBJ)sysopf.obj $(OBJ)voteedit.obj\
  274. ==        $(OBJ)gfledit.obj $(OBJ)tedit.obj $(OBJ)chnedit.obj\
  275. ==        $(OBJ)uedit.obj $(OBJ)diredit.obj $(OBJ)subedit.obj\
  276. ==        $(OBJ)xferovl.obj $(OBJ)multmail.obj $(OBJ)gfiles.obj\
  277. ==        $(OBJ)defaults.obj $(OBJ)misccmd.obj $(OBJ)xinit.obj\
  278. ==        $(OBJ)xfertmp.obj $(OBJ)batch.obj $(OBJ)srrcv.obj\
  279. ==        $(OBJ)srsend.obj $(OBJ)lilo.obj $(OBJ)subreq.obj\
  280. ==        $(OBJ)netsup.obj $(OBJ)subxtr.obj $(OBJ)multinst.obj\
  281. ==        $(OBJ)conf.obj $(OBJ)readmail.obj $(OBJ)instmsg.obj\
  282. ==        $(OBJ)bbsovl1.obj $(OBJ)extrn1.obj $(OBJ)bbsovl2.obj\
  283. ==        $(OBJ)sr.obj $(OBJ)ini.obj $(OBJ)xferovl2.obj\
  284. ==        $(OBJ)bbsovl3.obj $(OBJ)qwk.obj $(OBJ)qwk1.obj\
  285. --        $(OBJ)ripovl.obj
  286. ++        $(OBJ)ripovl.obj $(OBJ)wmchat.obj
  287.  
  288.           Save MAKEFILE.MAK
  289.  
  290. Step 11:  Open MMENU.C
  291.  
  292.           Make appropriate changes to mainmenu()
  293.  
  294. ==      extern_prog(s1, sysinfo.spawn_opts[8]);
  295. ==    } else
  296. --    chat_room();
  297. ++    wmchat();
  298. ==  }
  299. ==  if (strcmp(s,"/Z")==0) {
  300.  
  301. Step 12:  Open BBSUTL.C
  302.  
  303.           Add the marked line to set_language_1():
  304.  
  305. ==  set_strings_fn(2, languagedir, "YES.STR", 0);
  306. ==  set_strings_fn(3, languagedir, "NO.STR", 0);
  307. ++  set_strings_fn(wmchat_str, languagedir, "WMCHAT.STR", 0);
  308.  
  309.           Save BBSUTL.C
  310.  
  311. Step 13:  Open BBS.C
  312.  
  313.           Add this line in function main():
  314.  
  315. ==  } else {
  316. ==    instance=1;
  317. ==  }
  318. ++  set_wmstr();
  319. ==  already_on=0;
  320. ==  endday=0;
  321. ==  oklevel=0;
  322.  
  323.           Save BBS.C
  324.  
  325. Step 14:  Copy WMCHAT.OBJ into your OBJ directory (normally in a
  326.           sub-directory of your source code's directory.)
  327.  
  328. Step 15:  Copy WMCHAT.H to your source code directory.
  329.  
  330. Step 16:  Copy WMCHAT.INI to your WWIV BBS directory.
  331.  
  332. Step 17:  Copy WMCHAT.STR to your BBS language directory (usually GFILES).
  333.           If you use multiple languages, be sure to copy WMCHAT.STR to ALL
  334.           the directories.
  335.  
  336. Step 18:  Copy WMCHAT.ANS and WMCHAT.MSG into your GFILES directory.
  337.  
  338. Step 19:  Recompile!
  339.  
  340.           A tip -- you no longer need the internal WWIV chatroom, you may
  341.           wish to delete it to save memory.
  342.